From ef7c14968eccb1a73673416daaf90592608830e4 Mon Sep 17 00:00:00 2001 From: parkrrrr Date: Thu, 11 Aug 2005 19:25:53 +0000 Subject: [PATCH] Fixed (new) segfault. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@1359 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/xmltag.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gpsbabel/xmltag.c b/gpsbabel/xmltag.c index e044c3a68..992ec4871 100644 --- a/gpsbabel/xmltag.c +++ b/gpsbabel/xmltag.c @@ -63,6 +63,11 @@ void copy_xml_tag( xml_tag **copy, xml_tag *src, xml_tag *parent ) { char **ap = NULL; char **ap2 = NULL; int count = 0; + + if ( !src ) { + *copy = NULL; + return; + } res = xcalloc( 1, sizeof(xml_tag)); *copy = res; -- 2.30.2